package mortal.game.resource
{
	import com.gengine.resource.*;
	import flash.utils.*;
	import mortal.game.scene.modle.data.*;
	import mortal.game.scene.modle.frames.*;
	
	public class FrameTypeConfig extends Object
	{
		private var _map:Dictionary;
		private static var _instance:FrameTypeConfig;
		
		public function FrameTypeConfig()
		{
			this._map = new Dictionary();
			if (_instance != null)
			{
				throw new Error(" FrameTypeConfig 单例 ");
			}
			this.init();
			
		}
		
		private function write(param1:Object) : void
		{
			var _loc_2:SwfFrames = null;
			var _loc_3:ActionInfo = null;
			var _loc_4:Object = null;
			var _loc_5:Object = null;
			for each (_loc_5 in param1.modle)
			{
				
				_loc_2 = new SwfFrames(_loc_5.frameType, _loc_5.name);
				_loc_2.createAction(_loc_5);
				this._map[_loc_2.frameType] = _loc_2;
			}
			
		}
		
		public function init() : void
		{
			var _loc_1:* = ConfigManager.instance.getObjectByFileName("frameType.xml");
			this.write(_loc_1);
			
		}
		
		public function getFramesByType(param1:String) : SwfFrames
		{
			return this._map[param1];
		}
		
		public static function get instance() : FrameTypeConfig
		{
			if (_instance == null)
			{
				_instance = new FrameTypeConfig;
			}
			return _instance;
		}
		
	}
}
